package cn.fay.chapter10;

public class Outer {

	private String str;
	Outer(){}
	Outer(String str){
		this.str=str;
	}
	class Inner{
		public String toString(){
			method1();
			method2();
			method3();
			return str;
		}
		private int i=5;
	
	}
	public void method2(){
		System.out.println("out public method");
	}
	protected void  method1(){
		System.out.println("out protected method");
	}
	private  void  method3(){
		System.out.println(new Inner().i);
		System.out.println("out private method");
	}
	public static void main(String[] args) {
		Outer.Inner in=new Outer("muhaha").new Inner();
		System.out.println(new Outer().new Inner().i);
		System.out.println(in.toString());
		
	}

}
